/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package learn;

import drt.DrtExpression;
import parse.Category;

/**
 *
 * @author phong
 */
public class LexicalEntry {

    LexicalSurface surf;
    DrtExpression sem;  // semantics
    
    public LexicalEntry(String token, String lemma, String pos, 
            String ne, Category cat, DrtExpression sem) {
        this.surf = new LexicalSurface(token, lemma, pos, ne, cat);
        this.sem = sem;
    }
    
    public DrtExpression getSem() {
        return this.sem;
    }
    
    public LexicalSurface getLexSurf() {
        return this.surf;
    }
    
    public LexicalEntry(LexicalSurface suf, DrtExpression sem) {
        this.surf = suf;
        this.sem = sem;
    }
    
    @Override
    public boolean equals(Object o) {
        if (o instanceof LexicalEntry) {
            LexicalEntry that = (LexicalEntry)o;
            return this.surf.equals(that.surf) && this.sem.equals(that.sem);
        }
        else 
            return false;
    }
    
    @Override
    public int hashCode() {
        return this.surf.hashCode() + this.sem.hashCode() * 17;
    }
    
    
}
